<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="org.springframework.web.context.WebApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="db.TobDAO"%>
<%@page import="db.TeamDAO"%>
<%@page import="db.Team"%>
<%@page import="db.UserDAO"%>
<%@page import="db.User"%>
<%@ include file="/jsp/common/utility/logined.jsp" %>

<%
	WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
	TobDAO tobDao = (TobDAO)ctx.getBean("TobDAO");
	TeamDAO teamDao = (TeamDAO)ctx.getBean("TeamDAO");
	UserDAO userDao = (UserDAO)ctx.getBean("UserDAO");
	
	int uid = (Integer)session.getAttribute("id");
	User user = userDao.findById(uid);
	request.setAttribute("user",user);
	
	request.setAttribute("users",userDao.findAll());
	
	List tobList = tobDao.findAll();
	request.setAttribute("tobList",tobList);
	
	int tid = (Integer)session.getAttribute("tid");
	Team team = teamDao.findById(tid);
	request.setAttribute("teamName",team.getName());
	
	pageContext.forward("/vm/procure/procureApp.vm");
%>